package com.yanqu.road.entity.rank.cross;

import com.alibaba.fastjson.JSON;
import com.yanqu.road.entity.DataObject;

import java.math.BigInteger;

public class CrossActivityTeamRank extends DataObject {

    private int groupId;
    private int bigRankType;

    private int type;                             //排行榜类型

    private int rank;                             //名次

    private int teamId;

    private long serverId;

    private long lastUpdateTime;                  //最后一次更新时间

    private BigInteger value = BigInteger.ZERO;   //排名数据

    private String param = "";

    private TeamBaseInfo teamBaseInfo = new TeamBaseInfo();

    private boolean delete = false;                 // 是否删除


    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        this.groupId = groupId;
    }

    public int getBigRankType() {
        return bigRankType;
    }

    public void setBigRankType(int bigRankType) {
        this.bigRankType = bigRankType;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getTeamId() {
        return teamId;
    }

    public void setTeamId(int teamId) {
        this.teamId = teamId;
    }

    public long getServerId() {
        return serverId;
    }

    public void setServerId(long serverId) {
        this.serverId = serverId;
    }

    public long getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(long lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    public BigInteger getValue() {
        return value;
    }

    public void setValue(BigInteger value) {
        this.value = value;
    }

    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        this.param = param;
    }

    public TeamBaseInfo getTeamBaseInfo() {
        return teamBaseInfo;
    }

    public void setTeamBaseInfo(TeamBaseInfo teamBaseInfo) {
        this.teamBaseInfo = teamBaseInfo;
    }

    public boolean isDelete() {
        return delete;
    }

    public void setDelete(boolean delete) {
        this.delete = delete;
    }

    public int getRank() {
        return rank;
    }

    public void setRank(int rank) {
        this.rank = rank;
    }

    public CrossActivityTeamRank clone(){
        CrossActivityTeamRank teamRank = new CrossActivityTeamRank();
        teamRank.setServerId(serverId);
        teamRank.setValue(value);
        teamRank.setLastUpdateTime(lastUpdateTime);
        teamRank.setParam(param);
        teamRank.setTeamBaseInfo(teamBaseInfo);
        teamRank.setBigRankType(bigRankType);
        teamRank.setType(type);
        teamRank.setTeamId(teamId);
        return teamRank;
    }

    public String getTeamBaseInfoJsonStr() {
        if(null == teamBaseInfo){
            return "{}";
        }else {
            return JSON.toJSONString(teamBaseInfo);
        }
    }
}
